﻿using log4net;
using System.Collections.Generic;

namespace SharpChannel.Util
{
    public class LoggerHelper
    {
        private static IDictionary<string, ILog> loggerMap = new Dictionary<string, ILog>();

        public static ILog GetLogger(string topic = "")
        {
            if (loggerMap.ContainsKey(topic)) return loggerMap[topic];
            loggerMap[topic] = LogManager.GetLogger(topic);
            return loggerMap[topic];
        }
    }
}
